﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.IO;

namespace JSIF_WCFServer.Server
{
    /// <summary>
    /// A service that serves static files
    /// </summary>
    [ServiceContract(SessionMode = SessionMode.Allowed)] 
    public interface IStaticFiles
    {
        /// <summary>
        /// Fetches the contents of the file with the specified name
        /// </summary>
        /// <param name="name">the name of the file</param>
        /// <returns>the contents of the file with the specified name</returns>
        [WebInvoke(UriTemplate = "{*name}", BodyStyle=WebMessageBodyStyle.Bare, ResponseFormat = WebMessageFormat.Xml, Method="GET")]
        [OperationContract]
        Stream Fetch(String name);
    }
}
